function promiseTest1() {
    let promise1 = new Promise((resolve, reject) => {
        resolve();
        reject();
    });
    console.log(promise1);
}
promiseTest1();

function promiseThenMethodTest() {
    let promise1 = new Promise((resolve, reject) => {
        resolve();
        reject();
    }).then(() => {
        console.log("成功时的回调");
    }, () => {
        console.log("失败时的回调");
    });
}

function promiseThenTest2() {
    let promise1 = new Promise((resolve, reject) => {
        resolve('成功的结果');
    }).then((value) => {
        console.log("成功时的回调1", value);
    }, (reason) => {
        console.log("失败时的回调1", reason);
    }).then((value) => {
        console.log("成功时的回调2", value);
    }, (reason) => {
        console.log("失败时的回调2", reason);
    });
}